<%@page import="com.windfone.common.Constant"%>
<%@ page language="java" contentType="text/html; charset=utf-8"    pageEncoding="utf-8"%>
<%@ include file="head.jsp" %>
<%@ taglib uri="/WEB-INF/recommend.tld" prefix="windfone" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>風馳電訊-用戶登錄</title>
<%@ include file="headkey.jsp" %>
<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
<script>

function checkName(){
	var loginName = $("#loginName2").val();  
	if ( loginName !=""){
	$.ajax({  
	    type:"post",  
	    url:"<%=contextPath%>/checkLoginName.action",  
	    data:{loginName:loginName},  
     	success: function(msg){
	    	if ( msg == true )
		    	document.getElementById("msg").innerHTML = "<font color=red>已有该用户</font>";
		    else
		    	document.getElementById("msg").innerHTML = "<font color=green>可以使用该账号</font>";
			    	
	 	} 
	});
	}
}

function checkonSubmit2(){
	if ( $("#loginName2").val() ==""){
		alert("用户登录名不允许为空");
		$("#loginName2").focus();
		return false;
	} 
	if ( $("#password2").val() ==""){
		alert("密码不允许为空");
		$("#password").focus();
		return false;
	} 
	if ( $("#confpassword2").val() ==""){
		alert("确认密码不允许为空");
		$("#confpassword").focus();
		return false;
	} 
	if ( $("#confpassword2").val() != $("#password2").val()){
		alert("两次密码不正确");
		$("#password2").focus();
		return false;
	} 
	var loginName = $("#loginName2").val();  
	var userRegistFrm=document.getElementById("userRegistFrm");
	$.ajax({  
	    type:"post",  
	    url:"<%=contextPath%>/checkLoginName.action",  
	    data:{loginName:loginName},  
     	success: function(msg){
	    	if ( msg == false )
				userRegistFrm.submit();
	 	} 
	});
}
</script>
<link rel="stylesheet" type="text/css" href="css/css.css"/>
<link rel="stylesheet" type="text/css" href="css/common.css"/>
<link  rel="Stylesheet" type="text/css" href="css/order1.css"/>
<link  rel="Stylesheet" type="text/css" href="css/userloginctrl.css"/>
<style>
#coodoo_Header a
{
	font-size:14px;
	font-weight:bold;
	font-weight:bold;
	font-size:14px;
	color:#FFFFFF;
	text-decoration:none;
}
</style>
<style>
html{color:black; background:white;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,blockquote,th,td{margin:0; padding:0;}
body{font-size:12px; font-family:Arial, Helvetica, sans-serif;}
img{border:0px; vertical-align:top;}
a{font-size:12px; text-decoration:none;}
a,a:link,a:visited{color:#353535;}
a:hover{color:#fc6900;}
</style>


</head>
<body>

<div style="background-color:#FFFFFF;width: 950px;margin:0 auto;">
	<%@ include file="navigate.jsp" %>
<%-- main begin --%> 	
  <!-- <form name="aspnetForm" method="post" action="/Order1.aspx" id="aspnetForm" style="width: 950px;">-->
 
<div class="o1box">
	<dl class="box3">
		<dd class="tl gg31tleft"></dd>
		<dd class="tb gg31tbg" style="width: 930px;">
			<div class="tl1">购物流程</div>
		</dd>
		<dd class="tr gg31tright"></dd>
		<dd class="bg gg31bg" style="width: 939px; height: 81px;">
			<div class="lc"><img src="images/o1_img1.png" alt=""/></div>
			<div class="lc"><img src="images/o1_img2.png" alt=""/></div>
			<div class="lc"><img src="images/o1_img3.png" alt=""/></div>
			<div class="lc"><img src="images/sc_img3.png" alt=""/></div>
			<div class="lc"><img src="images/sc_img5.png" alt=""/></div>
			<div class="lc"><img src="images/sc_img3.png" alt=""/></div>
			<div class="lc"><img src="images/sc_img6.png" alt=""/></div>
			<div class="floatend"></div>
		</dd>
		<dd class="bl gg31bleft"></dd>
		<dd class="bb gg31bbg" style="width: 927px;"></dd>
		<dd class="br gg31bright"></dd>
		<dd class="floatend"></dd>
	</dl>
</div>
<div class="o1box">
	<div class="lrbox">
		<div class="login">
			<div class="img"><img src="images/o1_img4.png" alt=""/></div>
			<div id="upULCtrl">

</div>
<div class="ulctrl">
<script>
function checkonSubmit(){
	if ( $("#loginName").val() ==""){
		alert("用户登录名不允许为空");
		$("#loginName").focus();
		return false;
	} 
	if ( $("#password").val() ==""){
		alert("密码不允许为空");
		$("#password").focus();
		return false;
	} 
	var userLoginFrm = document.getElementById("userLoginFrm");
	userLoginFrm.submit();
}
</script>
	<form method="post" action="orderLogin.action" name="userLoginFrm" id="userLoginFrm">
	<ul>
		<li class="label" title="登陆名称">登录名称</li>
		<li class="input"><input name="loginName" maxlength="20" id="loginName"   style="width: 200px;" type="text"/></li>
		  <li class="oper"><!-- <input id="chkRem" name="$ulc1$chkRem" type="checkbox"><label for="chkRem">记住我</label> --></li>
		<li class="floatend"></li>

		<li class="label">登录密码</li>
		<li class="input"><input name="password" maxlength="50" id="password"   style="width: 200px;" type="password"/></li>
		<li class="oper"><a href="memberGetPWD.action">找回密码</a></li>
		<li class="floatend"></li>
	</ul>

	<div id="divULCtrlMsg" class="msg"></div>
	<div class="send">
	<input type="image"  onclick="checkonSubmit();return false;"  style="border-width: 0px;" src="images/ul_btnlogin.png"  />
	</div>
	</form>
</div> 
		</div>
		<div class="split"></div>
		<s:form id="userRegistFrm" name="userRegistFrm" action="orderRegisterUser"  method="post">
		<div class="reg">
			<div class="imgtitle"><img src="images/o1_img6.png" alt="" title=""/></div>
			<div>
				<ul class="oper_list">
					<li class="item">登录名称</li>
					<li class="item">
					<input name="loginName" maxlength="20" id="loginName2" onblur="checkName()"  style="width: 200px;" type="text"/>
					<span id="msg"></span>
					</li>
					<li id="LNameMsg" class="item_err"></li>
					<li class="title">您的用户名直可以包含：字母、数字、下划线</li>
				</ul>
				<ul class="oper_list">	
					<li class="item">登录密码</li>
					<li class="item"><input name="password" maxlength="50" id="password2"   style="width: 200px;" type="password"/></li>
					<li id="LPWDMsg" class="item_err"></li>
					<li class="title">6-12 位，可以使用：字母、数字、符号</li>
				</ul>			
				<ul class="oper_list">
					<li class="item">确认密码</li>
					<li class="item"><input name="confpassword" maxlength="50" id="confpassword2"   style="width: 200px;" type="password"/></li>
					<li id="LRPWDMsg" class="item_err"></li>
					<li class="title">重新输入登录密码</li>
				</ul>
				<ul class="oper_list">
					<s:token></s:token>
					<li class="item">邮箱地址</li>
					<li class="item"><input name="email" maxlength="100" id="email2" style="width: 200px;" type="text"/></li>
					<li id="UEmailMsg" class="item_err"></li>
					<li class="title">请正确输入您的电子邮件，以便接收商城信息，以及找回您的密码</li>
				</ul>
				<ul class="oper_list">
					<li class="item">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="green"><s:property value='rtvMsg'/></font></li>
				</ul>
			</div>
			<div class="send"><input   src="images/reg_btnreg.png" style="border-width: 0px;" type="image" onclick="checkonSubmit2();return false;"/></div>
		</div>
		</s:form>
		<div class="floatend"></div>
	</div>
</div>
 <!-- 
</form>
  -->
 	
	
<%-- main end --%> 	
	  <%@ include file="bottom.jsp" %>
</div>
 <div style="width:950px;height: 15">&nbsp;</div>
</body>
</html>
